package com.cdie.myschool.controller;

import com.cdie.myschool.common.R;
import com.cdie.myschool.service.DepartmentReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author 罗欢
 * @date 2022/10/5 - 9:30
 */
@RestController
@RequestMapping("/department")
public class DepartmentReportController {
    @Autowired
    private DepartmentReportService departmentReportService;

    @GetMapping("/departmentDirectory")
    public R departmentDirectory(){
        return departmentReportService.departmentDirectory();
    }

    @GetMapping("/departmentDisplay")
    public R departmentDisplay(@RequestParam String departmentCode){
        return departmentReportService.departmentDisplay(departmentCode);
    }
}
